set(COMPONENT_ADD_INCLUDEDIRS .)
set(COMPONENT_SRCS compact_wifi_board_cam.cc)

register_component()

# 添加摄像头组件依赖
set(COMPONENT_REQUIRES driver esp32 esp_http_client esp_http_server esp-camera)

# 启用摄像头支持
idf_component_get_property(esp_camera_dir esp-camera COMPONENT_DIR)
include_directories(${esp_camera_dir}/include)

# 配置编译选项
target_compile_definitions(${COMPONENT_LIB} PUBLIC BOARD_SUPPORT_CAMERA=1)
target_compile_definitions(${COMPONENT_LIB} PUBLIC BOARD_NAME="bread-compact-wifi-cam")